﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>#避免挂起 - 语法 &amp; 使用 | AutoHotkey v2</title>
<meta name="description" content="The #避免挂起 directive exempts subsequent hotkeys and hotstrings from suspension." />
<meta name="ahk:equiv-v1" content="commands/Suspend.htm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>#避免挂起</h1>

<p>豁免后续<a href="../Hotkeys.htm">热键</a>和<a href="../Hotstrings.htm">热字串</a>的<a href="Suspend.htm">挂起</a>.</p>

<pre class="Syntax"><span class="func">#避免挂起</span> <span class="optional">Exempt</span></pre>
<h2 id="Parameters">参数</h2>
<dl>

  <dt>Exempt</dt>
  <dd>
    <p>类型: <a href="../Concepts.htm#boolean">整数(布尔值)</a></p>
    <p><code>True</code> 或 <code>1</code> 表示允许豁免后续热键, 或者 <code>False</code> 或 <code>0</code> 表示禁用豁免. 如果省略, 则默认为 <code>True</code>.</p>
  </dd>

</dl>
<h2 id="Remarks">备注</h2>
<p>可以通过 <a href="Suspend.htm">挂起</a> 函数, 或<a href="../Program.htm#tray-icon">托盘图标</a>或<a href="../Program.htm#main-window">主窗口</a>挂起热键和热字符串.</p>
<p>如果在脚本中未指定此指令, 则在挂起脚本时禁用所有热键或热字符串, 即使是那些调用 <a href="Suspend.htm">挂起</a> 函数的热键或热字符串.</p>
<p>该指令不影响 <a href="Hotkey.htm">热键</a> 或 <a href="Hotstring.htm">热词</a> 函数.</p>

<h2 id="Related">相关</h2>
<p><a href="Suspend.htm">挂起</a>, <a href="../Hotkeys.htm">热键</a>, <a href="../Hotstrings.htm">热字串</a></p>

<h2 id="Examples">示例</h2>
<div class="ex" id="ExBasic">
<p><a href="#ExBasic">#1</a></p>
<pre>#避免挂起  <em>; 从 挂起 中豁免以下热键.</em>
#Esc::挂起 -1
#避免挂起 False  <em>; 禁用下面任何热键/热字符串的豁免.</em>
^1::信息框 "This 热键 is affected by 挂起."
</pre>
</div>

</body>
</html>